const router = require("koa-router")();

const { getMedicalList } = require("../controller/users");

router.prefix("/list");

router.get("/getMedicalList", async function (ctx, next) {
  const phone = ctx.request.query;
  const result = await getMedicalList(phone);
  if (result) {
    ctx.body = {
      code: 0,
      data: result,
    };
  } else {
    ctx.body = {
      code: 1,
    };
  }
});

module.exports = router;
